﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraReports.UI;
using DevExpress.XtraEditors;

namespace DTD2013.MainApp.UI
{
    public partial class guiReportPreview : XtraForm
    {
        /// <summary>
        /// Report preview
        /// </summary>
        private XtraReport RpPreview;

        public guiReportPreview()
        {
            InitializeComponent();
            RpPreview = new XtraReport();
        }

        public guiReportPreview(XtraReport rpPreview)
        {
            InitializeComponent();
            RpPreview = new XtraReport();
            RpPreview = rpPreview;
        }

        private void guiReportPreview_Load(object sender, EventArgs e)
        {
            printControl1.PrintingSystem = RpPreview.PrintingSystem;
            RpPreview.CreateDocument();
        }
    }
}
